package com.globallogic.university;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class StudentsGroup {

	private final String groupNo;
	private String speciality;
	private int yearStudy;
    private final HashSet<Subject> subjects;

    public StudentsGroup(String groupNo, String speciality, int yearStudy) {
        //To change body of created methods use File | Settings | File Templates.
        this.groupNo = groupNo;
        this.speciality = speciality;
        this.yearStudy = yearStudy;
        this.subjects = new HashSet<Subject>() {
        };
    }

    public String getSpeciality() {
		return this.speciality;
	}

	/**
	 * 
	 * @param speciality
	 */
	protected void setSpeciality(String speciality) {
		this.speciality = speciality;
	}

	public int getYearStudy() {
		return this.yearStudy;
	}

	/**
	 * 
	 * @param yearStudy
	 */
	protected void setYearStudy(int yearStudy) {
		this.yearStudy = yearStudy;
	}

    public String getGroupNo() {
        return groupNo;
    }

    public Set <Subject> getSubjects() {
       return this.subjects;
    }

    public void addSubject(Subject subject) {
            this.subjects.add(subject);
    }
}